<!-- 广告 -->
<template>
    <div class="advertising" :style="boxStyle">
        <div class="advertising-image">广告内容</div>
        <div class="advertising-font-letf-top">广告</div>
        <div class="advertising-font-right-bottom">活动推广</div>
    </div>
</template>

<script>
import { defineComponent, toRefs, computed } from 'vue'
export default defineComponent({
    name: 'WidgetAdvertising',
    props: {
        element: {
            type: Object,
            default: () => ({})
        }
    },
    setup(props, { emit }) {
        const { element } = toRefs(props)

        const boxStyle = computed(() => {
            const style = element.value.eles.style || {}
            return {
                marginTop: style['margin-top'],
                marginLeft: style['margin-left']
            }
        })

        return {
            element,
            boxStyle
        }
    }
})
</script>

<style lang="less" scoped>
@import './widget-advertising.less';
</style>